package com.yike.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yike.order.entity.Refund;
import com.yike.order.param.ShopRefundPageParam;
import com.yike.order.vo.RefundVo;
import org.apache.ibatis.annotations.Mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 退款单表 Mapper 接口
 *
 * @author yike
 * @since 2024-08-01
 */
@Mapper
public interface RefundMapper extends BaseMapper<Refund> {

    // 获取订单已退款金额
    BigDecimal getRefundAmountByOrderId(@Param("orderId") Long orderId);

    IPage<RefundVo> getShopRefundList(@Param("page") Page page,
                                      @Param("param") ShopRefundPageParam param);

    List<String> getRefundNos(@Param("orderId") Long orderId);


}
